<?php
	include '../controllers/setToken.php';
	
	$uid = $_REQUEST['uid'];
	if(empty($uid)) {
	  $msg = json_encode("用户id不能为空");
		echo '{"code":"1","msg":'.$msg.'}';
		exit();
	}

	$token= $_REQUEST['token'];
	if(empty($token)) {
	  $msg = json_encode("Apple Push Notification Token不能为空");
		echo '{"code":"1","msg":'.$msg.'}';
		exit();
	}
	
	$ibtOn = $_REQUEST['ibtOn'];
	$gmatOn = $_REQUEST['gmatOn'];
	$greOn = $_REQUEST['greOn'];
	
	uploadToken($uid, $token, $ibtOn, $gmatOn, $greOn);
	
?>